"A list of TCL procs, separated by spaces, which will be called sequentially to try to expand the address. Valid choices are \"Addr_FullNameMatch\" to search full names, \"Addr_Lookup\" to search for mail addresses, \"Alias_Lookup\" to search your MH/exmh alias list, and LDAP_Lookup to use an LDAP server."
}
{
addr_db(ldap_server)
addressdbLDAPServer
{}
"LDAP Server"
"The server to send LDAP queries to."
}
{
addr_db(ldap_searchbase)
addressdbLDAPSearchBase
{}
"LDAP Search Root"
"The root under which to conduct LDAP searches."
}
{
addr_db(ldap_encoding)
addressdbLDAPEncoding
{utf-8}
"LDAP Encoding"
"The character encoding used by the LDAP server."
}
{
addr_db(filter_regexp)
addressdbFilterRegexp
{}
"Regular expression filter"
"If set, addresses matching this regular expression pattern will not be saved in the database."
}
{
addr_db(skip_folders)
addressdbFoldersSkip
{}
"Folders to ignore"
"A list of one or more folders separated by spaces. Exmh will not save addresses from the mail in the folders in this list. An empty list will allow Exmh to add addresses from every folder. Groups of folders may be specified using * as a wild card anywhere in a folder name."
}
{
addr_db(filter_alternate_mailboxes)
addressdbFilterAltMailboxes
ON
"Ignore alternate mailboxes"
"If set, addresses that match the names specified as \"Alternate mailboxes\" in your MH profile will not be saved."
}
{
addr_db(key_force_save)
addressdbForceSave
<Control-Tab>
"Key to save an address"
"Key which, if pressed, will cause the address from the current message to be stored regardless of any filtering specified. This key is only active in the main exmh window so it may be the same as the \"Key to expand addresses\" without conflict. Pressing this key stores an address in the database even if it would have been filtered (not stored) due to matching \"Regular expression filter\", \"Folders to ignore\", or one of your alternate mailboxes."
}
{
addr_db(standard_address_format)
addressdbStandardFormat
ON
"Use \"address (Full Name)\" Format"
"If on, use \"address (Full Name)\" format for expanded addresses. Otherwise, use \"Full Name <address>\" format."
}
{
addr_db(remove_entries)
addressdbRemoveEntries
OFF
"Remove Old Entries"
"If on, remove old entries from the database"
}
{
addr_db(remove_days)
addressdbRemoveDays
{}
"Days Until Removal"
"Number of days until inactive entry is removed"
}
{
addr_db(remove_invalid_date)
addressdbRemoveInvalidDate
OFF
"Remove Invalid Date"
"If on, delete any entry with a non-null, but invalid date"
}
}
#addr_db is an array used for keeping state.
#make this an array from the get-go and set the default pref...
global addr_db
set addr_db(init) 1;
if ![info exists addr_db(curmethod)] {set addr_db(curmethod) 0}
if ![info exists addr_db(laststring)] {set addr_db(laststring) ""}
if ![info exists addr_db(lastfound)] {set addr_db(lastfound) ""}
if ![info exists addr_db(changed)] {set addr_db(changed) 0}
if ![info exists addr_db(filterstring)] {set addr_db(filterstring) ""}
if ![info exists addr_db(remove_entries)] {set addr_db(remove_entries) 0}
if ![info exists addr_db(remove_days)] {set addr_db(remove_days) ""}
if ![info exists addr_db(remove_invalid_date)] {set addr_db(remove_invalid_date) 0}
trace variable addr_db(hideexcluded) w Addr_Browse_Exclude_Change
Addr_LoadDB
}
#
# Hook_MsgShow is called when exmh displays a message. We parse out the
# From: header and call Addr_Save to update the entry in the database.
#
proc Hook_MsgShowAddr {path headervar } {
upvar $headervar header
global addr_db
set addr_db(last_seen) [list $path $header(0=1,hdr,from) $header(0=1,hdr,date)]